import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: Home,
    children: [{
        path: '/',
        meta:{title:'商品页'},
        component: () => import('../views/shoplist.vue')
      },
      {
        path: '/shopcar',
        meta:{title:'购物车'},
        component: () => import('../views/shopCar.vue')
      }
    ]
  },


]

const router = new VueRouter({
  routes
})

export default router